import Vue from "vue"
import App from "./App.vue"
import router from "./router"
import store from "./store"
import WeuiVue from "weui-design-vue"
import "weui-design-vue/lib/weui-design-vue.css"
import "src/assets/css/index.scss"
import "lib-flexible/flexible"
import shareStore from "src/store/shareStore.js"
import Cell from "src/components/Cell.vue"
import CellGroup from "src/components/CellGroup.vue"
import Axios from "axios"

Vue.config.productionTip = false

Vue.use(WeuiVue)

Vue.component("Cell", Cell)
Vue.component("CellGroup", CellGroup)

Vue.prototype.$global = shareStore

Vue.prototype.$axios = Axios.create({
  // baseURL: "http://localhost:3001/",
  baseURL: "http://sedationh.cn:3001/",
})

Vue.prototype.$axios.interceptors.response.use(
  (r) => r.data,
  (error) => Vue.prototype.$toptips.show(error.message)
)

new Vue({
  router,
  store,
  render: (h) => h(App),
}).$mount("#app")
